<!--内容开始-->
<section class="content">
    <div class="search">
        <form class="form-inline" action="">
            <a class="btn btn-flat btn-primary m_10" href="{:url('index')}">显示全部</a>
            <a class="btn btn-flat btn-success m_10 f_r m_t_5" onclick="javascript :history.back(-1)"><i
                    class="fa fa-undo m-r-10"></i>返 回</a>
        </form>
    </div>
    <!--数据表开始-->
    {if $info}
    <form method="post" action="{:url('editPost')}">
        <input type="hidden" name="id" value="{$info.id}"/>
    {else /}
    <form method="post" action="{:url('addPost')}">
    {/if}
        <!---->
        <div class="row">
            <div class="col-sm-12 col-xs-12">
                <div class="box box-body">
                    <div class="nav-tabs-custom">
                        <ul class="nav nav-tabs">
                            <li class="active"><a href="#tab_1" data-toggle="tab" aria-expanded="false">基础设置</a>
                            </li>
                            <li class=""><a href="#tab_2" data-toggle="tab" aria-expanded="false">SEO管理</a></li>
                        </ul>
                        <form method="post" action="{:url('system')}">
                            <div class="tab-content">
                                <div class="tab-pane active" id="tab_1">
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">选择模型</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <select name="moduleid" class="form-control">
                                                    <option value="">请选择模型</option>
                                                    {volist name="module" id="module"}
                                                    <option data-name='{$module.name}' {if $info.moduleid == $module.id}selected{/if} value='{$module.id}' >{$module.title}</option>
                                                    {/volist}

                                                </select>
                                            </div>
                                            <div class="col-xs-1 col-sm-4 col-md-6 col-lg-6 dd_ts">*</div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">列表模版</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <select name="template_list" class="form-control">
                                                    <option value=''>请选择</option>
                                                    {volist name="$template.list" id="temp"}
                                                    <option {if $info.template_list == $temp}selected{/if} value='{$temp}' >{$temp}</option>
                                                    {/volist}
                                                </select>

                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">详情模版</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <select name="template_show" class="form-control">
                                                    <option value=''>请选择</option>
                                                    {volist name="$template.show" id="temp"}
                                                    <option {if $info.template_show== $temp}selected{/if} value='{$temp}' >{$temp}</option>
                                                    {/volist}
                                                </select>

                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">上级栏目</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <select name="parentid" class="form-control">
                                                    <option value='0'>作为一级栏目</option>
                                                    {volist name="cate" id="cate"}
                                                    <option {if $id== $cate.id}selected{/if} value='{$cate.id}' >{$cate.lcatname}</option>
                                                    {/volist}
                                                </select>
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">栏目名称</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <input type="text" name="catname" class="form-control" placeholder="请输入栏目名称" value="{$info.catname}">
                                            </div>
                                            <div class="col-xs-1 col-sm-4 col-md-6 col-lg-6 dd_ts">*</div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">英文名称</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <input type="text" name="enname" class="form-control" placeholder="请输入英文名称" value="{$info.enname}">
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">栏目目录</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <input type="text" name="catdir" class="form-control" placeholder="请输入栏目目录" value="{$info.catdir}">
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                                可填写英文，不可有空格，唯一，用于URL美化，如：AboutUs
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">栏目图片</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <input type="text" name="image" class="form-control" placeholder="请点击按钮上传或手动输入地址" value="{$info.image}">
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                                <!--上传图片-->
                                                <!--用来存放item-->
                                                <div id="fileList_image" class="uploader-list">
                                                </div>
                                                <div id="filePicker_image"><i class="fa fa-upload m-r-10"></i>选择图片
                                                </div>
                                                <img class="image_preview"
                                                     src="{$info.image?$info.image:'/static/admin/images/nopic.png'}"
                                                     id="image_preview">
                                                <!--上传图片-->
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">ICO图片</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <input type="text" name="icoimage" class="form-control" placeholder="请点击按钮上传或手动输入地址" value="{$info.icoimage}">
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                                <!--上传图片-->
                                                <!--用来存放item-->
                                                <div id="fileList_icoimage" class="uploader-list">
                                                </div>
                                                <div id="filePicker_icoimage"><i class="fa fa-upload m-r-10"></i>选择图片
                                                </div>
                                                <img class="image_preview"
                                                     src="{$info.icoimage?$info.icoimage:'/static/admin/images/nopic.png'}"
                                                     id="icoimage_preview">
                                                <!--上传图片-->
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <div class="col-xs-11 col-sm-8 col-md-6 col-lg-5">
                                                <label class="text-lable">简介</label>
                                                <textarea class="form-control" name="summary" rows="3" placeholder="请输入简介">{$info.summary}</textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">导航显示</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <div class="dd_radio_lable_left">
                                                    {if $info}
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_menu" value="1"
                                                               class="dd_radio"
                                                               {$info.is_menu?'checked':''}><span>是</span>
                                                    </label>
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_menu" value="0"
                                                               class="dd_radio"
                                                               {$info.is_menu?'':'checked'}><span>否</span>
                                                    </label>
                                                    {else /}
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_menu" value="1"
                                                               class="dd_radio" checked><span>是</span>
                                                    </label>
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_menu" value="0"
                                                               class="dd_radio"><span>否</span>
                                                    </label>
                                                    {/if}
                                                </div>
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts"> *
                                                用于设置该栏目是否在导航显示
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">跳转下级</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <div class="dd_radio_lable_left">
                                                    {if $info}
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_next" value="1"
                                                               class="dd_radio"
                                                               {$info.is_next?'checked':''}><span>是</span>
                                                    </label>
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_next" value="0"
                                                               class="dd_radio"
                                                               {$info.is_next?'':'checked'}><span>否</span>
                                                    </label>
                                                    {else /}
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_next" value="1"
                                                               class="dd_radio"><span>是</span>
                                                    </label>
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_next" value="0"
                                                               class="dd_radio" checked><span>否</span>
                                                    </label>
                                                    {/if}
                                                </div>
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts"> *
                                                用于设置是否直接跳转到下级栏目的第一个菜单
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">新窗口打开</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <div class="dd_radio_lable_left">
                                                    {if $info}
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_blank" value="1"
                                                               class="dd_radio"
                                                               {$info.is_next?'checked':''}><span>是</span>
                                                    </label>
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_blank" value="0"
                                                               class="dd_radio"
                                                               {$info.is_next?'':'checked'}><span>否</span>
                                                    </label>
                                                    {else /}
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_blank" value="1"
                                                               class="dd_radio"><span>是</span>
                                                    </label>
                                                    <label class="dd_radio_lable">
                                                        <input type="radio" name="is_blank" value="0"
                                                               class="dd_radio" checked><span>否</span>
                                                    </label>
                                                    {/if}
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">分页条数</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <input type="text" name="pagesize" class="form-control"
                                                       placeholder="请输入分页条数" value="{$info.pagesize}">
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                                用于设置分页显示的数量，为空时默认值为系统设置的值
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">外部链接</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <input type="text" name="url" class="form-control"
                                                       placeholder="请输入外部链接" value="{$info.url}">
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts">
                                                如需跳转网站，请填写链接地址，为空则不跳转
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">排序</label>
                                            <div class="col-xs-7 col-sm-6 col-md-4 col-lg-4">
                                                <input type="text" name="sort" class="form-control"
                                                       placeholder="请输入排序" value="{$info.sort?$info.sort:'50'}">
                                            </div>
                                            <div class="col-xs-12 col-sm-4 col-md-6 col-lg-6 dd_ts"> *
                                                排序为从小到大排序，默认为50
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <!--->
                                </div>
                                <!-- /.tab-pane -->
                                <div class="tab-pane" id="tab_2">
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <label class="col-xs-4 col-sm-2 col-md-2 col-lg-1 control-label dd_input_l">SEO标题</label>
                                            <div class="col-xs-8 col-sm-6 col-md-4 col-lg-4">
                                                <input type="text" name="title" class="form-control"
                                                       placeholder="请输入SEO标题" value="{$info.title}">
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5">
                                                <label class="text-lable">SEO关键字</label>
                                                <textarea class="form-control" name="keywords" rows="3"
                                                          placeholder="请输入SEO关键字">{$info.keywords}</textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                    <div class="row dd_input_group">
                                        <div class="form-group">
                                            <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5">
                                                <label class="text-lable">SEO描述</label>
                                                <textarea class="form-control" name="description" rows="3"
                                                          placeholder="请输入SEO描述">{$info.description}</textarea>
                                            </div>
                                        </div>
                                    </div>
                                    <!---->
                                </div>
                                <!-- /.tab-pane -->
                            </div>

                            <div class="row dd_input_group">
                                <div class="form-group">
                                    <div class="col-xs-12 col-sm-8 col-md-6 col-lg-5 text-center">
                                        <button type="submit" class="btn btn-flat btn-primary ">提 交</button>
                                        <button type="button" class="btn btn-flat btn-default"
                                                onclick="javascript :history.back(-1)">返 回
                                        </button>
                                    </div>

                                </div>
                            </div>
                        </form>
                        <!-- /.tab-content -->
                    </div>
                </div>
                <!-- /.box -->
            </div>
        </div>
    </form>
    <!--数据表结束-->
</section>
<!--内容结束-->
<script type="text/javascript">
    webupload('fileList_image','filePicker_image','image_preview','image');
    webupload('fileList_icoimage','filePicker_icoimage','icoimage_preview','icoimage');
</script>

{if $moduleid}
<script>
    $(function(){
        var moduleid={$moduleid};
        $("select[name='moduleid']").val(moduleid).trigger('change');//新建下级目录的时候默认选中模型
    })
</script>
{/if}